package com.wj.Controller;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RequestMapping("/log")
@RestController
public class LoggerController {
    @RequestMapping("/printLog")
    public String printLog(){
        System.out.println("打印日志");
        log.info("==========我是日志对象打印的日志");
        return "success";
    }
/*    @RequestMapping("/printLog2")
    public String printLog2(){
        log.trace("这是trace级别的日志");
        log.debug("这是debug级别的日志");
        log.info("这是info级别的日志");
        log.warn("这是warn级别的日志");
        log.error("这是error级别的日志");
        return "打印不同级别的日志";
    }*/
}